<script setup>

import { useRoute, useRouter } from "vue-router";
import {  ref } from "vue";
const route = useRoute();
const router = useRouter();
const content = ref("");
const fileName = ref("");
const type = ref("");
const departName = ref("");
const noticeTime = ref("");
type.value = route.query.type;
content.value = route.query.content;
fileName.value = route.query.fileName;
if (type.value=='notice') {
    departName.value = route.query.departName;
    noticeTime.value = route.query.noticeTime
}
</script>
<template>
<div class="main">
      <div >
      <img
        style="width: 100%"
        src="../static/images/banner.png"
        alt=""/>
    </div>
</div>
    <div class="title">{{fileName}}</div>
    <tr></tr>
    <p class="content" v-if="type!='workInfo'">{{content}}</p>
    <div class="workContent" v-if="type=='workInfo'">
        <p v-for="(item,index) in content" :key="index">{{index+1}}.{{item}}</p>
    </div>
    <tr></tr>
    <div class="notice" v-show="type=='notice'">
        <p class="depart">{{departName}}</p>
        <p>{{noticeTime}}</p>
    </div>
</template>
<style lang="scss" scoped>
    .title{
        text-align: center;
        font-family: PingFang SC-Medium, PingFang SC;
        font-size: 20px;
        font-weight: bold;
    }
    .content{
        font-family: PingFang SC-Medium, PingFang SC;
        font-size: 14px;
        line-height: 20px;
        text-indent: 28px;
        white-space: pre-line;
    }
    .notice{
        text-align: right;
        font-family: PingFang SC-Medium, PingFang SC;
        font-size: 14px;
    }
    .workContent{
        font-family: PingFang SC-Medium, PingFang SC;
        font-size: 14px;
        text-indent: 18px;
        white-space: pre-line;
    }
    .depart{

    }
</style>